package main

import (
	"group-middleware/middleware"
	product_router "group-middleware/router/product"
	user_router "group-middleware/router/user"

	"github.com/gin-gonic/gin"
)

func main() {
	r := gin.Default()
	r.Use(middleware.MiddlewareController{}.MidHandler1, middleware.MidHandler2)
	r.GET("/index", func(c *gin.Context) {
		c.String(200, "Hello, World!")
	})
	user_router.UserRouterInit(r)
	product_router.ProductRouterInit(r)
	r.Run(":9000")
}
